import { request, config } from 'utils'
const { api } = config
const { module } = api

export async function checkModule (params) {
  return request({
    url: module+'/'+params.pk,
    method: 'get',
    data: params,
  })
}

export async function create (params) {
  //let data="name="+params.name+"&product_name_id="+params.product_name_id
  return request({
    url: module+'/add/',
    method: 'post',
    data: params,
  })
}

export async function remove (params) {
  return request({
    url: module+'/delete/'+params.pk,
    method: 'delete',
    data: params,
  })
}

export async function update (params) {
  return request({
    url: module+'/edit/'+params.pk,
    method: 'post',
    data: params,
  })
}

